l = [0,1,2,3]


take_ 0 _ = []
take_ (n+1) (x:xs) = x: (take_ n xs)

drop_ 0 xs = xs
drop_ (n+1) (_:xs) = drop_ n xs

ints_from n = n: ints_from (n+1)

worm x = x : (worm x)

evens =  evens_from 0

evens_from n | n `mod` 2==0 = n : (evens_from (n+2))
--evens_from _ = error "even number expected"

y = [x|x<-[1..10],x<5]

p = [(x,y)|x<-[1..5],y<-[100,103]]

t = take 20 [(x,(y,z))| x<-[1..],y<-evens,z<-worm 7]

main = print "todo"

f x = x+1

-- factorial :: Integer->Integer

factorial 0 = 1
factorial n = n* (factorial (n-1))

f1 n = if n==0 then 1 else n* (f1 (n-1))

fibo 0 = 1
fibo 1 = 1
fibo n = (fibo (n-2)) + (fibo (n-1))

not_like_this a b = [a..b]

{-

emulate 
        f0=[1..]
        f1=[2..9]        f1 a b = [a..b]
        f2=[1,3..11]
        f3=[1,4..]
        f4=[3,-2,-20]

-}

reverse_ [] = []
reverse_ (x:xs) = (reverse_ xs) ++ [x]












